package com.gym.client;

import com.gym.pojo.Equipmentupkeep;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.openfeign.SpringQueryMap;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Map;

@FeignClient(name = "gateway",path = "/equipment-provider",contextId = "equipmentupkeep")
public interface EquipmentUpKeepClient {

    /*
     * 查询全部器材维修信息
     * */
    @PostMapping("/selAllUpKeep")
    public Map<String,Object> selAllUpKeep(@RequestParam Integer pageIndex,
                                           @RequestParam(required = false) String equname,
                                           @RequestParam(required = false) String start,
                                           @RequestParam(required = false) String end);


    /**
     * 添加器材维修信息
     * @param equipmentupkeep
     * @return
     */
    @PostMapping("/addEquRepair")
    public boolean addEquRepair(@SpringQueryMap Equipmentupkeep equipmentupkeep) ;

    /*
     * 修改器材维修信息
     * */
    @PostMapping("/updateEquRepair")
    public boolean updateEquRepair(@RequestBody Equipmentupkeep equipmentupkeep) ;


    /*
     * 删除器材维修信息
     * */
    @PostMapping("/delEquRepair")
    public boolean delEquRepair(@RequestParam String equkeepid) ;

}
